<template>
  <div>
    <div class="footer_wrap">
      <div class="finance-2">
        <div><i class="el-icon-coin"></i>金融WEB</div>
        <div>值得信赖的投资理财平台</div>
      </div>
      <router-link to="/HomePage" class="finance_size">首页</router-link>
      <router-link
        to="/Investment"
        @click.native="finance_butt"
        class="finance_size"
        >我要投资</router-link
      >
      <router-link to="/Report" class="finance_size">媒体报道</router-link>
      <router-link to="/Information" class="finance_size">信息披露</router-link>
      <router-link to="/Ensure" class="finance_size">安全保证</router-link>
      <router-link to="/My" @click.native="finance_butt2" class="finance_size"
        >我的</router-link
      >
      <router-link to="/CustomerService" class="finance_size_1"
        ><i class="el-icon-s-check"></i> 在线客服</router-link
      >
      <p>免费热线：400-888-1888</p>
      <div @click="finance_size_2_but" class="finance_size_2">
        <i class="el-icon-switch-button"></i> 退出登录
      </div>
    </div>

    <div class="footer_wrap_top">
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
import axios from "axios";
export default {
  data() {
    return {};
  },
  methods: {
    finance_size_2_but() {
      axios({
        url: "/api/user/removeUser",
        mounted: "get",
        traditional: true,
      }).then((res) => {
        if(res.data==true){
          this.$router.push({path:'login'});
          this.$message({
          message: '账号退出成功！！',
          type: 'success'
        });
        }else{
this.$message.error('网络延迟，请重试！！！');
        }
      });
    },
    finance_butt() {
      axios({
        url: "/api/user/getSessionUser",
        mounted: "get",
        traditional: true,
      }).then((res) => {
        // alert(this.isif)
        if (res.data == true) {
          this.$router.push({ path: "Investment" });
        } else {
          this.$message({
            showClose: true,
            message: "很抱歉,您还无法访问,请先登录!!!",
          });
          this.$router.push({ path: "login" });
        }
      });
    },
    finance_butt2() {
      axios({
        url: "/api/user/getSessionUser",
        mounted: "get",
        traditional: true,
      }).then((res) => {
        // alert(this.isif)
        if (res.data == true) {
          this.$router.push({ path: "My" });
        } else {
          this.$message({
            showClose: true,
            message: "很抱歉,您还无法访问,请先登录!!!",
          });
          this.$router.push({ path: "login" });
        }
      });
    },
  },
};
</script>

<style lang="less" scoped>
/deep/.el-dialog__header {
  background-color: #edf2fc;
}
/deep/.el-dialog__body {
  background-color: #edf2fc;
  color: #909399;
}
/deep/.el-dialog__footer {
  background-color: #edf2fc;
}
.footer_wrap p {
  font-size: 80%;
  line-height: 100px;
  float: left;
  margin-left: 40px;
}
.finance_size {
  font-size: 110%;
  margin-left: 30px;
  line-height: 100px;
  float: left;
  color: rgb(30, 28, 28);
}
.finance_size_1 {
  font-size: 80%;
  margin-left: 50px;
  line-height: 100px;
  float: left;
  color: rgb(30, 28, 28);
}
.finance_size_2:hover {
  color: red;
}
.finance_size_1:hover {
  color: red;
}
.finance_size_2 {
  font-size: 80%;
  margin-left: 50px;
  line-height: 100px;
  cursor: pointer;
  float: left;
  color: rgb(30, 28, 28);
}
.footer_wrap_top {
  padding-top: 62px;
  background-color: #fff;
}
.footer_wrap {
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  width: 100%;
  /* text-align: center; */
  background-color: #ffffff;
  color: #ccc;
  float: left;
  z-index: 99999;
}

.footer_wrap .router-link-active {
  color: red;
}

.finance-2 {
  float: left;
  /* background-color: rgb(43, 210, 49); */
  margin-top: 17px;
  margin-left: 10%;
}
.finance-2 div:nth-child(1) {
  font-size: 190%;
  color: red;
  font-weight: bold;
}
.finance-2 div:nth-child(2) {
  font-size: 90%;
}
</style>